{% extends 'base.html' %}
{% block title %}{{ kind_name }}{% endblock %}
{% block header %} 
    {{ kind_name }}文章列表
{% endblock %}
{% block content %}
    {% for i in articles %}
    <div class="card mb-2 mt-2 border-warning">
        <div class="card-body">
            <h4 class="card-title">
                <span class="badge badge-danger">
                    {{ i.get_category_display }}
                </span>
                <a href="/article/{{ i.article_id }}">{{i.title}}</a>
            </h4>
            <p class="card-text">
                {{ i.content|truncatechars:20 }}...
            </p>
            <small>
                {{ i.post_datetime }}
                阅读数：{{ i.read_count }}
            </small>
        </div>
    </div>
    {% empty %}
    <h3 >抱歉，无此类文章</h3>
    <!-- <p>是否为此类文章添加信息?</p>
    <a href="/add_article" class="btn btn-secondary">是</a>
    <a href="/" class="btn btn-secondary ml-4">否</a> -->
    {% endfor %}
{% endblock %}